package com.kys.application;

import com.alibaba.dubbo.config.annotation.Reference;
import com.alibaba.dubbo.config.spring.context.annotation.DubboComponentScan;
import com.kys.application.consumerService.TestConSumerService;
import com.kys.dubboInterface.TestInterface;
import com.kys.dubboModule.TestModule;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication
@DubboComponentScan("com.kys")
public class ConsumerAnnApplication implements CommandLineRunner {
    @Autowired
    TestConSumerService testConSumerService;
    public static void main(String[] args) {
        SpringApplication.run(ConsumerAnnApplication.class);
    }


    @Override
    public void run(String... args) throws Exception {
        TestModule testModule=testConSumerService.getTestInterface().getTestModule("heheh","123123");
        System.out.println(testModule.getAge()+"|"+testModule.getName());
    }
}
